home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / bbs / pad311.zip / BUILD.BAT < prev    next >
DOS Batch File  |  1996-08-21  |  2KB  |  74 lines

  1. @echo off
  2. if %1. == . goto commandLineError
  3. if %2. == . goto noSecondParam
  4. set MEX_INCLUDE=%2
  5. :noSecondParam
  6.  
  7. if exist %MEX_INCLUDE%\max.mh goto maxOk
  8. echo Can't find file: %MEX_INCLUDE%\max.mh
  9. echo Please pass the directory containing max.mh as the second parameter
  10. echo to this batch file or type:
  11. echo.
  12. echo SET MEX_INCLUDE=[directory name]
  13. echo.
  14. echo before running this batch file, where [directory name] is the name
  15. echo of the directory containing max.mh. Usually, this file is located
  16. echo in a subdirectory of your main max directory called "m".
  17. echo.
  18. goto done
  19. :maxOk
  20. if exist %1\mex.exe goto mexpOk
  21. echo Can't find file: %1\mex.exe
  22. goto done
  23. :mexpOk
  24. if exist getphone.mex goto getphoneOk
  25. echo Can't find file: getphone.mex
  26. goto done
  27. :getPhoneOk
  28.  
  29. %1\mex init
  30. if errorlevel 1 goto compileError
  31. %1\mex getphone
  32. if errorlevel 1 goto compileError
  33. %1\mex checknum
  34. if errorlevel 1 goto compileError
  35. %1\mex verify
  36. if errorlevel 1 goto compileError
  37. %1\mecca *.mec
  38. if errorlevel 1 goto compileError
  39.  
  40. echo.
  41. echo Compilation completed successfully.
  42. echo.
  43.  
  44. goto done
  45.  
  46. :commandLineError
  47. echo Compiles all files necessary to run the Padlock call back verifier.
  48. echo.
  49. echo Syntax:
  50. echo.
  51. echo    BUILD [maximus directory] [mex include directories]
  52. echo.
  53. echo Where [maximus directory] is the name of the directory containing MECCA.EXE
  54. echo and MEX.EXE, and [mex include directories] includes the directory containing
  55. echo the file MAX.MH.
  56. echo.
  57. goto done
  58.  
  59. :compileError
  60. echo.
  61. echo Compilation errors were detected. These errors must be corrected
  62. echo before you can use Padlock. Compilation errors are often caused
  63. echo by mistakes in SETTINGS.MH. Double check your changes to this
  64. echo file and then run this batch file again. For more information on
  65. echo compile time errors, see section 14.3 of your Maximus documentation.
  66. echo.
  67. :done
  68.  
  69. if %2. == . goto end
  70.  
  71. set MEX_INCLUDE=
  72.  
  73. :end
  74.